﻿#ifndef INSTRUCTIONTURNTABLERATEMODE_H
#define INSTRUCTIONTURNTABLERATEMODE_H

#include <qobject.h>

#include "ScriptInstruction.h"

class InstructionTurnTableRateMode :public ScriptInstruction
{
  Q_OBJECT
private://property
  float rate = 0;
  float acceleration = 0;
private:
  static const int byteArraySize=sizeof (rate)+sizeof (acceleration);//除去指令类型标识符后的数据大小
public:
  explicit InstructionTurnTableRateMode();
  InstructionTurnTableRateMode(InstructionTurnTableRateMode const& instructionTurnTableRateMode);
  InstructionTurnTableRateMode& operator=(InstructionTurnTableRateMode const & instructionTurnTableRateMode);
  virtual ~InstructionTurnTableRateMode();
public:
  virtual QString toString()override;
  virtual QByteArray toByteArray() override;
  virtual InstructionTurnTableRateMode* clone()override;
  static ScriptInstruction* fromByteArray1(char * const src,int size,int * offset);
public://geter and seter
  float getRate();
  InstructionTurnTableRateMode* setRate(float rate);
  float getAcceleration();
  InstructionTurnTableRateMode* setAcceleration(float acceleration);
};
#endif
